#ifndef TCPCLIENTWIDGET_H
#define TCPCLIENTWIDGET_H

#include <QWidget>
#include <QTcpSocket>

namespace Ui {
class TcpClientWidget;
}

class TcpClientWidget : public QWidget
{
    Q_OBJECT

public:
    explicit TcpClientWidget(QWidget *parent = 0);
    ~TcpClientWidget();

private slots:
    void on_pushButtonSend_clicked();

    void on_pushButtonConnect_clicked();

    void slotConnected();
    void slotDisconnect();
    void slotError(QAbstractSocket::SocketError);
    void slotStateChanged(QAbstractSocket::SocketState);
    void slotReadData();

private:
    Ui::TcpClientWidget *ui;

    QTcpSocket *tcpSocket;
};

#endif // TCPCLIENTWIDGET_H
